﻿using System;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
namespace AKMII.DMRA.Common
{
    public enum UserType
    {
        MarketDirector = 0,
        Administrator = 1
    }

    public enum UserStatus
    {
        Active = 0,
        Inactive = 1,
        Unavailable = 2
    }

    public enum LoginStatus
    {
        Success = 0,
        AccountNotExist = 1,
        PasswordIncorrect = 2,
        AccountLocked = 3,
        NotChangePassword = 4,
        Failed = 5
    }

    public enum OperatorStatus
    {
        None = 0,
        Delete = 1,
        Add = 2,
        Edit = 3,
        Ignore = 4
    }

    public enum OrderType
    {
        All = 0,
        ALN = 1,
        Business = 2
    }

    public static class Constants
    {
        public static string LogConfigFile;
        public static string ExcelReportPath;
        public static readonly string ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"];
        public static readonly string EncryptSetting = ConfigurationSettings.AppSettings["EncryptType"];

        public const string SheetNameForSummaryReport = "Market {0} Terr {1}";
        public const string FormatOfNameField = "{0}   {1}/  {2}/   {3}/   {4}=    {5}";
        public const string FileNameForOrder = "{0}_{1}_{2}{3}_DetailRpt.xls";
        public const string FileNameForSummaryOrder = "{0}_{1}{2}_SumRpt.xls";
        public const string SubjectForOrderMail = "Lead card order confirmation for {0}{1}";
        public const string FileNameForSummaryToDMRA = "{0}_{1}_{2}.txt";
        public const string ContentForOrderMail = "This is an automated confirmation of your order for {0}{1}. Please see the attached detail reports for details.";
        public const string ContentForSummaryMail = "This is an automated confirmation of your order for {0}{1}.";
        //public const string ContentForOrderMail = "Thank you for your recent April lead card on-line order. This is an automated confirmation of your order for {0}{1}. Please see the attached lead detail reports for details.\r\n\r\nNote: If you had already received this confirmation with your excel attachments after you placed your order last week, you should delete that confirmation and attachments.  Due to some last minute formatting bugs in the reports that we wanted to fix, this email confirmation and reports is final and should be kept for your records.\r\n\r\nIf you are using a version of office earlier than 2007, you may need to download a patch to view the file correctly. If you are having a problem opening this file, please download the Microsoft patch at http://www.microsoft.com/downloads/details.aspx?FamilyID=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en then try to open the file again.";
        public const string MDHomepage = "/MDPages/MDHomepage.aspx";
        public const string OrderMapPage = "/MDPages/OrderMap.aspx";
        public const string AdminHomepage = "/AdminPages/Admin.aspx";
        public const string LoginUrl = @"~\Login.aspx";
        public const string AccountNotExistInfo = "Sorry, the account you input doesn't exist.";
        public const string PasswordIncorrectInfo = "Sorry, you input incorrect password just now, if you input incorrect password more than three time, your account will be locked.";
        public const string LoginFailedInfo = "Sorry, you can't login now, please try later.";
        public const string AccountLockedInfo = "Sorry, your account is locked, please contact administrator.";

        public const string PrinterName = "HP Color LaserJet 9500 PS";
        public const string ClassName = "SELECT * FROM Win32_Printer";
        public const string CommandOfSetDefaultPrinter = "SetDefaultPrinter";

        public const string MailSubjectException = "Exception in {0}";
        public const string MailContentException = "Exception in {0} at {1}, it is maybe caused by the {2}. Please check your setting by using admin page firstly. Thanks";
        public const string MailSubjectAccountLock =" Account Locked Reminder";
        public const string MailContentAccountLock = "MD Account {0} has been locked at time {1}";
        public const string MailSubjecttSettingChange = "System Setting Changed Reminder";
        public const string MailContentSettingChange = "{0} changed the {1} at {2}.\r\nPlease check the new settings.";
        public const string MailSubjectMonthSetting = "Month Setting Change Reminder";
        public const string MailContentMonthSetting = "This mail is to advise you that on {0} {1} made the following changes:\n{2}.";
    }
}
